home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 July / macformat-026.iso / mac / Shareware City / Developers / NString 1.0 beta / Sources / Alphabet_Private.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-07  |  599 b   |  17 lines  |  [TEXT/KAHL]

  1.  
  2. #ifndef _ALPHABET_PRIVATE_H_
  3. #define _ALPHABET_PRIVATE_H_
  4.  
  5. // --- Some defines used in the implementation of the Alphabet functions
  6.  
  7. #define SET_ELT(IDX)    buffer[((int)(IDX)) >> 3] |= 1 << (((int)(IDX)) & 7)
  8.     // set the buffer bit corresponding to the element having index IDX.
  9.  
  10. #define CLR_ELT(IDX)    buffer[((int)(IDX)) >> 3] &= ~(1 << (((int)(IDX)) & 7))
  11.     // clear the buffer bit corresponding to the element having index IDX.
  12.  
  13. #define ELT(IDX)    ((buffer[((int)(IDX)) >> 3] & (1 << (((int)(IDX)) & 7))) ? 1 : 0)
  14.     // return 1 iff the element with index IDX is present in the set, 0 otherwise
  15.  
  16. #endif
  17.